JBoss Community Archive (Read Only)

PicketLink

PicketLink IDM

PicketLink IDM library provides a comprehensive API and Implementation for managing the lifecycle of Identity (User,Role,Group) along with attributes.

The Implementation is backed by either an LDAP, a Database (via JPA) or a File System.

API Usage

Creating an Identity Manager

IdentityManager identityManager = new DefaultIdentityManager();

Bootstrap Identity Manager with a configuration for LDAP

//Create an LDAP Configuration
LDAPConfigurationBuilder builder = new LDAPConfigurationBuilder();
LDAPConfiguration ldapconfig = (LDAPConfiguration) builder.build();
ldapconfig.setBindDN("uid=admin,ou=system").setBindCredential("secret").setLdapURL(LDAP_URL);
ldapconfig.setUserDNSuffix(USER_DN_SUFFIX).setRoleDNSuffix(ROLES_DN_SUFFIX);
ldapconfig.setGroupDNSuffix(GROUP_DN_SUFFIX);

//Create Identity Configuration
IdentityConfiguration config = new IdentityConfiguration();
config.addStoreConfiguration(ldapconfig);

identityManager.bootstrap(config, new DefaultIdentityStoreInvocationContextFactory(null));

Bootstrap Identity Manager with a configuration for DB

//Injected or configured
EntityManagerFactory emf;

IdentityConfiguration identityConfig = new IdentityConfiguration();
JPAIdentityStoreConfiguration config = new JPAIdentityStoreConfiguration();
identityConfig.addStoreConfiguration(config);

IdentityManager identityManager = new DefaultIdentityManager();
identityManager.bootstrap(identityConfig, new DefaultIdentityStoreInvocationContextFactory(emf));

More Information

User Management

Role Management

Group Management

Attribute Management

Queries

Relationships

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-11 12:19:13 UTC, last content change 2013-09-05 21:41:59 UTC.